{

    // 定义泛型，用于接收一个接口
    interface Response<T> {
        status: number,
        statusText: string,
        headers: object,
        data: T
    }
    
    interface Data<T> {
        code: string,
        msg: string,
        data: T
    }

    // 用户数据的接口
    interface Users {
        id: string,
        name: string,
        age: number
    }
    
    // 数据管理的接口
    interface Book {
        id: string,
        book: string,
        price: number
    }
    
    const res1: Response<Data<Users>> = {
        status: 200,
        statusText: 'OK',
        headers: { token: 'asda' },
        data: {
            code: '0000',
            msg: '请求成功',
            data: {
                id: 'asdas-asd2xce',
                name: '迪丽热巴',
                age: 18
            }
        }
    }
    
    const res2: Response<Data<Book>> = {
        status: 304,
        statusText: 'OK',
        headers: { token: 'asdasdasd' },
        data: {
            code: '0000',
            msg: '请求成功',
            data: {
                id: 'asde3g4t75sdf22ce',
                book: '一千零一夜',
                price: 1001
            }
        }
    }
    
    console.log(res1);
    console.log(res2);
    
    
    }